<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0;
        }
    
        ul,
        li,
        ol {
            list-style: none;
        }
    
        div {
            margin: 100px auto;
            width: 300px;
            height: 300px;
            border: 1px solid royalblue;
        }
    
        ul {
            width: 300px;
            height: 50px;
            overflow: hidden;
        }
    
        ul>li {
            float: left;
            width: 100px;
            border: none;
            text-align: center;
            line-height: 50px;
            background-color: slategrey;
            font-size: 40px;
        }
    
        ul>li:active {
            background-color: skyblue;
        }
    
        ol {
            position: relative;
            height: 250px;
            width: 100%;
        }
    
        ol>li {
            position: absolute;
            height: 100%;
            width: 100%;
            background-color: purple;
            line-height: 250px;
            text-align: center;
            left: 0;
            top: 0;
            color: red;
            font-size: 50px;
            display: none;
        }
    
        ol>li:active {
            display: block;
        }
    </style>
</head>
<body>
    <div>
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
        </ul>
        <ol>
            <li class="active">1</li>
            <li> 2</li>
            <li> 3</li>
        </ol>
    </div>
</body>
</html>
